<?php

namespace App\Containers\AppSection\Moneybox\UI\API\Controllers;

use App\Containers\AppSection\Moneybox\Actions\EchoAction;
use App\Containers\AppSection\Moneybox\Actions\IdentificationAction;
use App\Containers\AppSection\Moneybox\Actions\StatusNotificationAction;
use App\Containers\AppSection\Moneybox\UI\API\Requests\EchoRequest;
use App\Containers\AppSection\Moneybox\UI\API\Requests\IdentificationRequest;
use App\Containers\AppSection\Moneybox\UI\API\Requests\StatusNotificationRequest;
use App\Ship\Parents\Controllers\ApiController;
use Illuminate\Http\JsonResponse;

class Controller extends ApiController
{
    public function echo(EchoRequest $request): JsonResponse
    {
        $data = app(EchoAction::class)->run($request);

        return $this->json($data);
    }

    public function statusNotification(StatusNotificationRequest $request): JsonResponse
    {
        app(StatusNotificationAction::class)->run($request);

        return $this->noContent();
    }

    public function identification(IdentificationRequest $request): JsonResponse
    {
        app(IdentificationAction::class)->run($request);

        return $this->noContent();
    }
}
